package com.lzy.cloud.mq.service;

import com.lzy.framework.core.utils.DozerUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description: lzy-cloud-service
 *
 * @author: ellengou
 * @date: 2018-07-18 星期三
 * @time: 11:50
 */
@Component
@Slf4j
public class XXXSender {

    @Autowired
    private AmqpTemplate rabbitTemplate;

//    public void sender(String key,String msg){
//        log.info("test.payment send message: "+msg);
//        rabbitTemplate.convertAndSend(key, msg);
//    }

    public void sender(String msg){
        log.info("test.payment send message: "+msg);
        Object ok = rabbitTemplate.convertSendAndReceive("test.payment", msg);
        log.info("1"+ok);
    }
}
